import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import Layout from "@/layout/index.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "",
    component: Layout,
    redirect: "",
    children: [
      {
        path: "",
        name: "Index",
        component: () => import("@/views/index/index.vue")
      },
      {
        path: "test",
        name: "Test",
        component: () => import("@/views/test/index.vue")
      }
    ]
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
